package chapter21;

import java.util.Comparator;
public class StudentClassComparator
    implements Comparator<StudentClass>, java.io.Serializable{
        public int compare(StudentClass o1, StudentClass o2){
            double areq1 = o1.score;
            double areg2 = o2.score;

            if (areq1 < areg2)
                return -1;
            else if (areq1 == areg2)
                return 0;
            else
                return 1;
        }

    }

